<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The Yaf_Route_Static class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="yaf-route-simple.route.html">« Yaf_Route_Simple::route</a></li>
      <li style="float: right;"><a href="yaf-route-static.assemble.html">Yaf_Route_Static::assemble »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.yaf.html">Yaf</a></li>
    <li>The Yaf_Route_Static class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.yaf-route-static" class="reference">

 <h1 class="title">The Yaf_Route_Static class</h1>
 

 <div class="partintro"><p class="verinfo">(Yaf &gt;=1.0.0)</p>


  <div class="section" id="yaf-route-static.intro">
   <h2 class="title">简介</h2>
   <p class="para">
     默认的，<span class="classname"><a href="class.yaf-router.html" class="classname">Yaf_Router</a></span> 只有一个<span class="classname"><strong class="classname">Yaf_Route_Static</strong></span> 作为它默认的路由
   </p>
   <p class="para">
     <span class="classname"><strong class="classname">Yaf_Route_Static</strong></span> 旨在处理80%的要求。
   </p>
   <p class="para">
     请注意：实例化 <span class="classname"><strong class="classname">Yaf_Route_Static</strong></span> 是没有必要的，也没必要将它加入<span class="classname"><a href="class.yaf-router.html" class="classname">Yaf_Router</a></span>的路由堆栈，因为在<span class="classname"><a href="class.yaf-router.html" class="classname">Yaf_Router</a></span>的路由堆栈中总是存在它的一个实例，并且总是在最后被调用。
   </p>
  </div>


  <div class="section" id="yaf-route-static.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">Yaf_Route_Static</strong>
     </span>
     
     <span class="oointerface"><span class="modifier">implements</span> 
       <a href="class.yaf-router.html" class="interfacename">Yaf_Router</a></span> {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
            <span class="modifier">public</span> <span class="methodname"><a href="yaf-route-static.assemble.html" class="methodname">assemble</a></span>(<span class="methodparam"><span class="type">array</span> <code class="parameter">$info</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$query</code><span class="initializer"> = ?</span></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-route-static.match.html" class="methodname">match</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$uri</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-route-static.route.html" class="methodname">route</a></span>(<span class="methodparam"><span class="type"><a href="class.yaf-request-abstract.html" class="type Yaf_Request_Abstract">Yaf_Request_Abstract</a></span> <code class="parameter">$request</code></span>): <span class="type">bool</span></div>

   }</div>


  </div>

 </div>

 
























<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="yaf-route-static.assemble.html">Yaf_Route_Static::assemble</a> — 组合url</li><li><a href="yaf-route-static.match.html">Yaf_Route_Static::match</a> — The match purpose</li><li><a href="yaf-route-static.route.html">Yaf_Route_Static::route</a> — Route a request</li></ul>
</div>
</div></div></body></html>